<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/share/_meta.jsp" %>
<%@ include file="/share/_footer.jsp" %>
<div class="page-container">
    <form class="form form-horizontal" id="myform">
        <input type="hidden" value="${id }" name="id" id="id">    
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>手机号：</label>
            <div class="formControls col-xs-8 col-sm-9">
            <input type="text" class="layui-input input-text radius size-L" placeholder="用于短信提醒" value="" name="buyerPhone" id="buyerPhone">
            </div>
        </div>
         <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span>购方税号：</label>
            <div class="formControls col-xs-8 col-sm-9">
             <input type="text" class="layui-input input-text radius size-L" placeholder="企业要填，个人可为空" value="" name="buyerTaxNum" id="buyerTaxNum">
            </div>
        </div>      
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                <button type="button" class="btn btn-secondary radius size-L" id="save">保&nbsp;存</button>
                <button type="button" class="btn btn-secondary radius size-L" onclick="layer_close();">取&nbsp;消</button>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
$('#save').click(function(){
	var id=$("#id").val();
	$("#myform").ajaxSubmit({
         url: "${pageContext.request.contextPath }/rest/nuonuoInvoiceByDirectfee",
         data:{
             id : id
         },
         beforeSubmit: function () {
             layer.load();
         },
         success: function(data){
             layer.closeAll('loading');
             if (data.success) {
                 window.parent.location.reload();
             }else {
                 layer.alert(data.message);
             }
         },
         error: function(XmlHttpRequest, textStatus, errorThrown){
             layer.closeAll('loading');
             layer.alert('error!',{icon:1,time:2000});
         }
     });
});
</script>